package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the RiskControl table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="RiskControl"
 */

public abstract class BaseRiskControl  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "RiskControl";
	public static String PROP_RISK_I_D = "RiskID";
	public static String PROP_BUY_NUM = "BuyNum";
	public static String PROP_LIMIT = "Limit";
	public static String PROP_CODE = "Code";
	public static String PROP_GAME_I_D = "GameID";


	// constructors
	public BaseRiskControl () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseRiskControl (java.lang.Integer riskID) {
		this.setRiskID(riskID);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseRiskControl (
		java.lang.Integer riskID,
		java.lang.Integer gameID,
		java.lang.String code,
		java.lang.Integer buyNum) {

		this.setRiskID(riskID);
		this.setGameID(gameID);
		this.setCode(code);
		this.setBuyNum(buyNum);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer riskID;

	// fields
	private java.lang.Integer gameID;
	private java.lang.String code;
	private java.lang.Integer limit;
	private java.lang.Integer buyNum;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="RiskID"
     */
	public java.lang.Integer getRiskID () {
		return riskID;
	}

	/**
	 * Set the unique identifier of this class
	 * @param riskID the new ID
	 */
	public void setRiskID (java.lang.Integer riskID) {
		this.riskID = riskID;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: GameID
	 */
	public java.lang.Integer getGameID () {
		return gameID;
	}

	/**
	 * Set the value related to the column: GameID
	 * @param gameID the GameID value
	 */
	public void setGameID (java.lang.Integer gameID) {
		this.gameID = gameID;
	}



	/**
	 * Return the value associated with the column: Code
	 */
	public java.lang.String getCode () {
		return code;
	}

	/**
	 * Set the value related to the column: Code
	 * @param code the Code value
	 */
	public void setCode (java.lang.String code) {
		this.code = code;
	}



	/**
	 * Return the value associated with the column: Limit
	 */
	public java.lang.Integer getLimit () {
		return limit;
	}

	/**
	 * Set the value related to the column: Limit
	 * @param limit the Limit value
	 */
	public void setLimit (java.lang.Integer limit) {
		this.limit = limit;
	}



	/**
	 * Return the value associated with the column: BuyNum
	 */
	public java.lang.Integer getBuyNum () {
		return buyNum;
	}

	/**
	 * Set the value related to the column: BuyNum
	 * @param buyNum the BuyNum value
	 */
	public void setBuyNum (java.lang.Integer buyNum) {
		this.buyNum = buyNum;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof RiskControl)) return false;
		else {
			RiskControl riskControl = (RiskControl) obj;
			if (null == this.getRiskID() || null == riskControl.getRiskID()) return false;
			else return (this.getRiskID().equals(riskControl.getRiskID()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getRiskID()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getRiskID().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}